#include<vector>
#include<iostream>
using std::vector;

class Solution {
public:
    int numTrees(int n) {
        vector<int> dp(n+1, 0);
        dp[0] = 1;
        dp[1] = 1;
        for (int k = 2; k <= n; k++) {
            // 逐步把dp[k]求出来，代表n=k时的数量
            for (int i = 1; i <= k; i++)
                dp[k] += dp[i-1] * dp[k-i];
        }
        for (auto n: dp) std::cout << n << " ";
        std::cout << "\n";
        return dp[n];
    }
};

int main() {
    int n;
    std::cin >> n;
    std::cout << Solution().numTrees(n) << "\n";
    return 0;
}